//
//  YHBaseObject.m
//  MoreCoin
//
//  Created by 林宁宁 on 2019/9/18.
//  Copyright © 2019 MoreCoin. All rights reserved.
//

#import "YHBaseObject.h"


@implementation YHBaseObject

+(NSDictionary<NSString *,id> *)modelCustomPropertyMapper{
    NSMutableDictionary * dataDic = [NSMutableDictionary new];
    [dataDic addEntriesFromDictionary:@{@"yh_id":@"id",
                                        @"m_id":@"id",
                                        @"ID":@"id",
                                        @"itemID":@"id"}];
    
    NSDictionary * yh_dic = [self yh_modelCustomPropertyMapper];
    if(yh_dic){
        [dataDic addEntriesFromDictionary:yh_dic];
    }
    return dataDic;
}

+(NSDictionary<NSString *,id> *)yh_modelCustomPropertyMapper{
    return nil;
}

+(NSArray *)yh_modelsWithArray:(id)json{
    return [NSArray yy_modelArrayWithClass:[self class] json:json];
}

+(instancetype)yh_modelWithDictionary:(id)json{
    return [[self class] yy_modelWithDictionary:json];
}


-(instancetype)init{
    self = [super init];
    if(self){
        [self yh_commonInit];
    }
    return self;
}
- (void)yh_commonInit{
    
}
@end
